// 283. 移动零

/**
 * @param {number[]} nums
 * @return {void} Do not return anything, modify nums in-place instead.
 */
var moveZeroes = function (nums) {
    let index = 0;
    for (let num of nums) {
        if (num != 0) {
            nums[index++] = num;
        }
    }
    for (let i = index; i < nums.length; i++) {
        nums[i] = 0;
    }
};
